package com.learner.trade.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;


/**
* @Description: 简单流水号生成
* @Author: ice2020x
* @Date: 2021/10/20
*/
public class OrderNoUtils {

    public static String getOrderNo() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
        String newDate = sdf.format(new Date());
        String result = "";
        Random random = new Random();
        for (int i = 0; i < 3; i++) {
            result += random.nextInt(10);
        }
        return newDate + result;
    }

}
